//index.js
//获取应用实例
const app = getApp()

Page({
  data:{
    bt:[
      {color:"#1ed1a7",bk:"饮水",id:1},
      {color:"#1ed1a7",bk:"洗澡",id:2},
      {color:"#1ed1a7",bk:"图书",id:3}
    ],
    img:[
      {url:"../../images/订单.png"},
      {url:"../../images/book.png"},
      {url:"../../images/订单.png"}
    ]
  },
  tiaozhuan:function(res){
    console.log(res.currentTarget.dataset.id)
    switch(res.currentTarget.dataset.id){
      case 1: console.log("饮水")
      wx.navigateTo({
        url: '../water/water',
      })
      break;
      case 2: console.log("洗澡")
      wx.navigateTo({
        url: '../xizao/xizao',
      })
      break;
      case 3: console.log("图书")
      wx.navigateTo({
        url: '../book/book',
      })
      break;
    }
  }
  
})
